#ifndef FRAME_H
#define FRAME_H


#include "pframe.h"


typedef struct _CFrame
{
	_DEP_FRAME
	point		cSize;
} CFrame;



// Public Common Interfaces
//pCFrame	newCFrame(point *Size);
//void		CFrameConstruct(pCFrame This, point *Size);
PLIBEXP void	deleteCFrame(pCFrame This);

PLIBEXP void	CFrameClear(pCFrame This);
PLIBEXP void	CFrameClearRect(pCFrame This, int32 Left, int32 Top,
				int32 Right, int32 Bottom);
PLIBEXP void	CFrameFillRect(pCFrame This, int32 Left, int32 Top,
				int32 Right, int32 Bottom, COLORSIZE Color);

PLIBEXP void	CFrameBitmapBlt(pCFrame This, int32 dx, int32 dy, pCBitmap Src);
PLIBEXP void	CFrameBitmapBltSection(pCFrame This, int32 dx, int32 dy,
				int32 sx, int32 sy, int32 sw, int32 sh, pCBitmap Src);

PLIBEXP void	CFrameTransparentBitmapBlt(pCFrame, int32 DestX, int32 DestY,
				pCBitmap Src);
PLIBEXP void	CFrameTransparentBitmapBltSection(pCFrame, int32 dx, int32 dy,
				int32 sx, int32 sy, int32 sw, int32 sh, pCBitmap Src);

PLIBEXP void	CFrameTransparentBitmapScaleBlt(pCFrame,
				int32 dx, int32 dy, int32 dw, int32 dh,
				pCBitmap Src);
PLIBEXP void	CFrameTransparentBitmapScaleBltSection(pCFrame,
				int32 dx, int32 dy, int32 dw, int32 dh,
				int32 sx, int32 sy, int32 sw, int32 sh, pCBitmap Src);

PLIBEXP void	CFrameScroll(pCFrame, prect pArea, int32 DeltaX, int32 DeltaY);
PLIBEXP void	CFrameGrab(pCFrame, int32 sx, int32 sy, pCBitmap Dest);

PLIBEXP void	CFrameLine(pCFrame, int32, int32, int32, int32, COLORSIZE);
PLIBEXP void	CFrameLineClipped(pCFrame This, int32 x1, int32 y1,
				int32 x2, int32 y2, prect region, COLORSIZE Color);
PLIBEXP void	CFrameLineBox(pCFrame, int32, int32, int32, int32, COLORSIZE);


PLIBEXP void	CFrameBltSection(pCFrame This, int32 dx, int32 dy, int32 sx, int32 sy, int32 sw, int32 sh, pCBitmap Src);
PLIBEXP void	CFrameBlt(pCFrame This, int32 dx, int32 dy, pCBitmap Src);

PLIBEXP void	CFrameCAlphaBlt(pCFrame This, int32 dx, int32 dy, pCBitmap Src, uint8 alpha);

PLIBEXP void	CFrameGetRect(pCFrame This, int32 sx, int32 sy, int32 sw, int32 sh, pCBitmap dest);

#define CFrameWidth(This)		((This) ? (This)->cSize.x : 0)
#define CFrameHeight(This)		((This) ? (This)->cSize.y : 0)
//#define CFrameWidth(This)		CBitmapWidth((This)->cFrame)
//#define CFrameHeight(This)		CBitmapHeight((This)->cFrame)

// Protected Common Interfaces
void		CFrameDestruct(pCFrame This);


#endif
